﻿using Dsl.Ped.AddIn.Java.Style;
using System.ComponentModel.Composition;
using Dsl.Ped.AddIn.Java.Generated;
using Dsl.Ped.Framework.AddIns;
using Dsl.Ped.Framework.Common;

namespace Dsl.Ped.AddIn.Java
{
    /// <summary>
    /// This is the implementation of the Java AddIn
    /// It properly exports all metadata required by the DSLPed
    /// </summary>
    [Export(typeof(IDslPedAddIn))]
    [ExportMetadata("Extension", "java")]
    [ExportMetadata("Name", "Java")]
    [ExportMetadata("ProjectiveType", typeof(Class))]
    [ExportMetadata("Namespace", "http://www.emftext.org/language/featherweightjava")]
    [ExportMetadata("ResourceDictionary", typeof(JavaResourceDictionary))]
    [ExportMetadata("ImageUri", "Resources/Images/java_32.png")]
    [ExportMetadata("Description", "DSL representing a Java language of a limited grammar. Known as Featherweight Java")]
    public class JavaAddIn : IDslPedAddIn
    {
        /// <summary>
        /// Gets the default object used for the instantiation of a new Java source code object
        /// </summary>
        /// <returns>Object representing the default Java source code</returns>
        public IProjective GetDefaultObject()
        {
            return new Class { name = "class", superclass = "superclass" };
        }
    }
}
